import { PORT1 } from "./config/servicePort";
export default {
  //获取打印机列表
  getPrinterList(params) {
    return {
      methods: 'post',
      url: PORT1 + `/printStation/getPrinterList`,
      params
    }
  },
  //添加打印机
  addPrinter(params) {
    return {
      methods: 'post',
      url: PORT1 + `/printStation/savePrinterInfo`,
      params
    }
  },
  //删除打印机
  deletePrinter(params) {
    return {
      methods: 'post',
      url: PORT1 + `/printStation/delPrinter`,
      params
    }
  },
  //启用、禁用打印机
  switchPrinter(params) {
    return {
      methods: 'post',
      url: PORT1 + `/printStation/openPrinter`,
      params
    }
  },
  //获取当前打印任务
  currentTask(params) {
    return {
      methods: 'get',
      url: PORT1 + `/printStation/getTaskCurrentByPrintId`,
      params
    }
  },
  //获取历史打印任务
  historyTask(params) {
    return {
      methods: 'get',
      url: PORT1 + `/printStation/getTaskHistoryByPrintId`,
      params
    }
  },
  //获取全部待打印任务
  treatTask(params) {
    return {
      methods: 'get',
      url: PORT1 + `/printStation/getTaskCurrentAll`,
      params
    }
  },
  //取消当前打印任务
  cancelPrint(params) {
    return {
      methods: 'post',
      url: PORT1 + `/printStation/cancelPrint`,
      params
    }
  },
  // 更新打印任务状态
  updateTasksStatus(params) {
    return {
      methods: 'post',
      url: PORT1 + `/printStation/updateTasksStatus`,
      params
    }
  }
}
